<!DOCTYPE html>
<!-- 
Template Name: Metronic - Responsive Admin Dashboard Template build with Twitter Bootstrap 3.1.1
Version: 2.0.2
Author: KeenThemes
Website: http://www.keenthemes.com/
Contact: support@keenthemes.com
Purchase: http://themeforest.net/item/metronic-responsive-admin-dashboard-template/4021469?ref=keenthemes
License: You must have a valid license purchased only from themeforest(the above link) in order to legally use the theme for your project.
-->
<!--[if IE 8]> <html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!-->
<html lang="en" class="no-js" ng-app="searchApp">
<!--<![endif]-->
<!-- BEGIN HEAD -->
<head>
<meta charset="utf-8" />
<title>运营管理平台</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta content="width=device-width, initial-scale=1.0" name="viewport" />
<meta content="" name="description" />
<meta content="" name="author" />
<!-- BEGIN GLOBAL MANDATORY STYLES -->
<link href="assets/plugins/bootstrap/css/bootstrap.min.css"
	rel="stylesheet" type="text/css" />
<link href="assets/css/style-metronic.css" rel="stylesheet"
	type="text/css" />
<link href="assets/css/style.css" rel="stylesheet" type="text/css" />
<link href="assets/css/themes/default.css" rel="stylesheet" type="text/css" id="style_color" />
<link href="assets/css/pages/login.css" rel="stylesheet" type="text/css" />
<link href="assets/css/public.css" rel="stylesheet" type="text/css" />

<link rel="shortcut icon" href="assets/favicon.ico" />
<style type="text/css">
	#block_none{
		display: none;
	}
</style>
</head>
<!-- BEGIN BODY -->
<body class="login" ng-controller="SearchController">
	<!-- BEGIN LOGO -->
	<!--<div class="logo">
	<div class="content" style="padding-bottom: 0px; padding-top: 40px;">
		<a href="index.html">
			<img src="assets/img/logo.png" alt="" height="50px"/>
		</a>
	</div>
</div>-->
	<!-- END LOGO -->
	<!-- BEGIN LOGIN -->
	<div class="login_box">
		<div class="content fr">
			<!-- BEGIN LOGIN FORM -->
			<div class="login-form" id="searchFrom">
				<h3 class="form-title">运营管理平台</h3>
				<div class="form-group">
					<!--ie8, ie9 does not support html5 placeholder, so we just show field title for that-->
					<label class="control-label visible-ie8 visible-ie9">查询类型</label>
					<div class="input-icon">
						
						<select ng-model="searchType" class="form-control" ng-click="dp()">
							<option value="1">根据站ID查询</option>
							<option value="2">根据桩ID查询</option>
							
						</select>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label visible-ie8 visible-ie9">查询ID</label>
					<div class="input-icon">
						<input class="form-control placeholder-no-fix " key="required"
							type="text" autocomplete="off" placeholder="查询ID1" ng-model="searchId"/>
					</div>
				</div>
				<div class="form-group" id="block_none">
					<div class="input-icon">
						<input class="form-control placeholder-no-fix " key="required"
						type="text" autocomplete="off" placeholder="查询ID2" ng-model="searchId_two"/>
					</div>
				</div>
				<div class="form-actions">
					<div>
						<button type="button" class="btn blue pull-right login-btn"
							ng-click="search();">查询</button>
					</div>

				</div>
			</div>
			<!-- END LOGIN FORM -->
		</div>
		<img src="assets/img/login-text.png" class="fl" />
	</div>
	<!-- END LOGIN -->
	<!-- BEGIN JAVASCRIPTS(Load javascripts at bottom, this will reduce page load time) -->
	<!-- BEGIN CORE PLUGINS -->
	<!--[if lt IE 9]>
	<script src="assets/plugins/respond.min.js"></script>
	<script src="assets/plugins/excanvas.min.js"></script> 
	<![endif]-->
	<script src="assets/plugins/jquery-1.10.2.min.js"
		type="text/javascript"></script>
	<script src="assets/plugins/bootstrap/js/bootstrap.min.js"
		type="text/javascript"></script>
	
	
	<!-- END CORE PLUGINS -->
	<!-- BEGIN PAGE LEVEL SCRIPTS -->
	<script type="text/javascript" src="assets/plugins/bootbox/bootbox.min.js"></script>
	<script src="assets/scripts/utilBootbox.js" type="text/javascript"></script>
	<script type="text/javascript" src="assets/scripts/angular/angular.js"></script>
	<!-- END PAGE LEVEL SCRIPTS -->

	<script>
		var searchApp = angular.module("searchApp", []);
		searchApp.controller("SearchController", function($scope) {
			$scope.searchType = '1';
			$scope.dp = function(){
				if('1'==$scope.searchType){
					$('#block_none').css('display','none');
				}else if('2'==$scope.searchType){
					$('#block_none').css('display','block');
				}
			}
			$scope.search = function() {
				if('1'==$scope.searchType){
					if(!!$scope.searchId){
						if(/^\d{20}$/.test($scope.searchId)){
							url="chargingStation.html?station_id="+$scope.searchId;
						}else{
							bootboxWindow.alert("请输入正确的站号");
						}
						window.location = url;
						var v = parseUrl();
					}else{
						bootboxWindow.alert("站号不能为空");
					}
				}else if('2'==$scope.searchType){
					if(!!$scope.searchId && !!$scope.searchId_two){			
						if(/^\d{16}$/.test($scope.searchId) && /^\d{16}$/.test($scope.searchId_two)){

						url="chargingPile.html?charger_id_1="+$scope.searchId+"&charger_id_2="+$scope.searchId_two;

					}else{
						bootboxWindow.alert("请输入正确的桩号");
					}
					window.location = url;
					var v = parseUrl();
					}else{
						bootboxWindow.alert("桩号不能为空");
					}
					

				}
				
			}
		});
	</script>
	<!-- END JAVASCRIPTS -->
</body>
<!-- END BODY -->
</html>